package kr.co.mcshop.comment;

import java.util.ArrayList;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CommentService {

	@Autowired
	private SqlSession sqlSession;

	public ArrayList<Comment> selectcomment(Map map) {
		CommentMapper mapper = sqlSession.getMapper(CommentMapper.class);
		return mapper.selectcomment(map);
	}

	public int commentInsert(Map map) {
		CommentMapper mapper = sqlSession.getMapper(CommentMapper.class);
		return mapper.commentInsert(map);
	}

}
